package com.bgIntlgn.client.entity.jishubu;

import yuhuibear.poat.annotations.action.AutoGenerateValue;
import yuhuibear.poat.annotations.relation.Field;
import yuhuibear.poat.annotations.relation.Table;
import yuhuibear.poat.object.bean.Bean;

/**
 * 零件属性交叉表
 * 
 * @author shenzhang
 * 
 */
@Table(name = "element_attrs", constrain = "")
public class ElementAttr implements Bean {

	@AutoGenerateValue(skipOnNull = true, sqlToGet = "select currval('element_attrs_id_seq')")
	@Field(name = "id", type = "bigserial", constrain = "primary key")
	private Long id;

	/**
	 * 引用产品版本的ID
	 */

	@Field(name = "uid", type = "char(80)", constrain = "not null references element_subversions(uid) on update cascade on delete cascade")
	private String uid;

	/**
	 * 属性类型(数据字典), [DictionaryType : 元件参数类别]
	 */
	@Field(name = "type", type = "int8", constrain = "not null references dictionarys(id) on update cascade ")
	private Long type;

	/**
	 * 属性名称
	 */
	@Field(name = "name", type = "varchar(60)", constrain = "")
	private String name;

	/**
	 * 属性值
	 */
	@Field(name = "value", type = "varchar(60)", constrain = "")
	private String value;

	/**
	 * 是否被编入UID
	 */
	@Field(name = "in_uid", type = "boolean", constrain = "default false")
	private boolean inUID;

	public boolean isInUID() {
		return inUID;
	}

	public void setInUID(boolean inUID) {
		this.inUID = inUID;
	}

	public String getUid() {
		return this.uid;
	}

	public void setUid(String uid) {
		this.uid = uid != null ? uid.trim() : null;
	}

	public Long getType() {
		return type;
	}

	public void setType(Long type) {
		this.type = type;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

}
